/*
 * support3
 */
package com.pitop.errorcode.entity;

/**
 * 错误码库 的实体类的状态
 *
 * @author support3
 */
public enum ErrorcodePoolState implements java.io.Serializable {
    //枚举定义在此
    Enable("可用"),
    Disable("禁用"),;

    public String val;

    ErrorcodePoolState(String val) {
        this.val = val;
    }

    ErrorcodePoolState() {

    }

    /**
     * 根据状态名称查询状态
     *
     * @param stateName
     * @return
     */
    public static ErrorcodePoolState getEnum(String stateName) {
        for (ErrorcodePoolState errorcodePoolState : ErrorcodePoolState.values()) {
            if (errorcodePoolState.name().equalsIgnoreCase(stateName)) {
                return errorcodePoolState;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.name();
    }

}
